package org.wuqi.microweb.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.wuqi.microweb.interceptor.JwtInterceptor;

/**
 * @author jjj
 * @program: earnest-money
 * @description:TODO
 * @date 2024-01-10 11:04:32
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private JwtInterceptor jwtInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry){
       registry.addInterceptor(jwtInterceptor).addPathPatterns("/**").excludePathPatterns("/public/**");
    }
}
 
 